public class Ex4_27{
	public static void main(String[] args){
		int count = 0;
		for (int year = 2001; year <= 2100; year++){
			if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0){
				System.out.printf("%6d", year);
				if (++count % 10 == 0)
					System.out.printf("\n");
			}
		}
		System.out.printf("\n");
	}
}